<template>
	<div class="page monitor">
		<x-header class='header' slot="header" :left-options="{backText: ''}">监测指导</x-header>
		<div class="top" style="height: 50px; width: 100%;"></div>
		<view-box>
			<group class='group' v-for="item in monitor_guidance">
				<cell title="监测指标" :value="item.monitorNumber"></cell>
				<cell title="测量次数" :value="item.monitorIndex"></cell>
				<cell title="测量时间" :value="item.monitorTime"></cell>
				<cell :title="'注意事项:　' + item.monitorNote" value="" style='padding: 4px 15px 15px;font-size: 14px; color: rgb(51,51,51);'></cell>
			</group>
		</view-box>

	</div>
</template>

<script>
	import Api from '@/api/index.js' //  引入api文件
	export default {
		data() {
			return {
				customer_id: '',
				monitor_guidance: []
			}
		},
		created(){
			this.customer_id = localStorage.getItem('customer_id');
			console.log(this.customer_id)
			this.getData();
		},
		methods: {
			// 获取数据
			getData(){  //  GET /improve/monitor_guidance/{customer_id}
				const monitor_guidanceApi = Api.monitor_guidanceApi + this.customer_id  //  监测指导
				this.$http.get(monitor_guidanceApi)
				.then(({data})=>{
					this.monitor_guidance = data.data;
					console.log(data)
				})
				.catch((err)=>{
					console.log(err);
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	.monitor {
		position: fixed !important;
		left: 0;
		top: 0;
		right: 0;
		background: #fff;
		z-index: 999;
		width: 100%;
		height: 100%;
		overflow: hidden;
		.group {
			margin-bottom: 10px;
		}
	}
</style>